<?php
$this->headLink()
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/main.css')
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/contact.css');
$this->headScript()
        ->appendFile($this->APP_STATIC_SERVER . '/public/js/jquery.validate.min.js')
        ->appendFile($this->APP_STATIC_SERVER . '/public/js/jquery.ui/jquery.effects.core.min.js');
?>
<?php $this->placeholder('slide')->captureStart() ?>
<div class="s-item">
    <div class="s-i-caption">
        <h3>Contact Us</h3>
        <p>Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text</p>
    </div>
    <div class="s-i-image">
        <img alt="" src="<?php echo$this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN ?>/images/contact-banner.png"/>
    </div>
</div>
<?php $this->placeholder('slide')->captureEnd() ?>

<div id="main-outter">
    <div id="main">
        <div id="m-left">
            <h2><?php echo $this->translate('mail_contact_infomation_title') ?></h2>
            <div class="contact-info">
                <ul>
                    <li><?php echo $this->translate('mail_contact_infomation_name') ?>: Tu Nguyen Van</li>
                    <li><?php echo $this->translate('mail_contact_infomation_email') ?>: contact@idgit.com.vn</li>
                    <li><?php echo $this->translate('mail_contact_infomation_skype') ?>: tu.designer</li>
                    <li><?php echo $this->translate('mail_contact_infomation_phone') ?>: +84 972.261.273</li>
                </ul>
            </div>
            <img alt="" src="<?php echo$this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN ?>/images/big-mail.jpg"/>
        </div>
        <div id="m-right">
            <script type="text/javascript">
                var RecaptchaOptions = {
                    custom_translations : {
                        instructions_visual : "Enter two words:",
                        instructions_audio : "Trascrivi ci\u00f2 che senti:",
                        play_again : "Riascolta la traccia audio",
                        cant_hear_this : "Scarica la traccia in formato MP3",
                        visual_challenge : "Modalit\u00e0 visiva",
                        audio_challenge : "Modalit\u00e0 auditiva",
                        refresh_btn : "Chiedi due nuove parole",
                        help_btn : "Aiuto",
                        incorrect_try_again : "Scorretto. Riprova."
                    },

                    lang : 'en'
                };
            </script>

            <?php
            $message = $this->flashMessenger();
            if ($message) {
            ?>
                <div id="message"><?php echo $message; ?></div>
            <?php } ?>
                
            <div id="error-box">
                <ul>

                </ul>
            </div>

            <form name="frmContact" action="" id="frmContact" method="post" enctype="multipart/form-data">
                <div class="row">
                    <label for="from_name"><?php echo $this->translate('mail_contact_from_name') ?></label>
                    <input type="text" class="text" id="from_name" name="from_name" value=""/>
                </div>
                <div class="row">
                    <label for="from_mail"><?php echo $this->translate('mail_contact_from_mail') ?></label>
                    <input type="text" class="text" id="from_mail" name="from_mail" value=""/>
                </div >
                <div class="row">
                    <label for="subject"><?php echo $this->translate('mail_contact_subject') ?></label>
                    <input type="text" class="text" id="subject" name="subject" value=""/>
                </div>
                <div class="row">
                    <label for="content"><?php echo $this->translate('mail_contact_content') ?></label>
                    <textarea class="text" id="content" name="content" cols="100" rows="5"></textarea>
                </div>
                <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LdHatASAAAAAJ-O5wIkrQgS7_ofgG2LRMnbKBif">
                </script>
                <noscript>
                    <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LdHatASAAAAAJ-O5wIkrQgS7_ofgG2LRMnbKBif"
                            height="300" width="500" frameborder="0"></iframe><br>
                    <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
                    <input type="hidden" name="recaptcha_response_field" value="manual_challenge">
                </noscript>
                <input id="btnSend" type="submit" value="<?php echo $this->translate('mail_contact_send') ?>"/>
                <input id="btnReset" type="reset" value="<?php echo $this->translate('mail_contact_reset') ?>"/>
            </form>
            <script type="text/javascript">
                $(document).ready(function(){
                    $("#frmContact").validate({
                        rules: {
                            from_name: {
                                required : true,
                                maxlength: 255
                            },
                            from_mail:{
                                email: true,
                                required: true
                            },
                            subject: {
                                required : true,
                                maxlength: 255
                            },
                            content:{
                                required : true
                            }
                        },
                        messages :{
                            from_name: {
                                required : "<?php echo $this->translate('mail_contact_name_required') ?>",
                                maxlength: "<?php echo $this->translate('mail_contact_name_max_length') ?>"
                            },
                            from_mail:{
                                email: "<?php echo $this->translate('mail_contact_email_invalid') ?>",
                                required: "<?php echo $this->translate('mail_contact_email_required') ?>"
                            },
                            subject: {
                                required : "<?php echo $this->translate('mail_contact_subject_required') ?>",
                                maxlength: "<?php echo $this->translate('mail_contact_subjext_max_length') ?>"
                            },
                            content:{
                                required : "<?php echo $this->translate('mail_contact_content_required') ?>"
                            }
                        },
                        errorContainer: "#error-box",
                        errorLabelContainer: "#error-box ul",
                        wrapper: "li",
                        errorElement: 'b',
                        highlight: function(element, errorClass) {
                            $(element).addClass('error');
                        }
  
                    });
                   
                });
            </script>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
<div class="clearfix"></div>
<?php echo $this->rWidget('news', 'featured', array('limit' => 4, 'category_id' => 59)); ?>
